#用户的登陆验证
#  用户依次输入用户名和密码，提交验证
#  用户不存在，密码错误，都显示用户名或密码错误提示
#  错误三次，则退出程序
#  验证成功则显示登录信息
name='kenny'
password='123'
count = 1
while count <= 3:
    n=input("Please enter username: ")
    p=input('Please enter password:')
    if name == n and password == p:
        print("login succeed")
        break
    else:
        print("wrong username or password")
        count += 1
else:
    print('failed three time, quit!')
# 用for 写法试试？